package com.lingnan.wanxiangxinxun.service.Impl;

import com.lingnan.wanxiangxinxun.entity.po.AuthorApplication;
import com.lingnan.wanxiangxinxun.Repository.AuthorApplicationRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuthorApplicationServiceImpl {
    @Autowired
    private AuthorApplicationRepository aaRepository;

    //新增
    public void save(AuthorApplication authorApplication) {
        aaRepository.save(authorApplication);
    }

    //删除
    public void delete(String id) {
        aaRepository.deleteById(id);
    }

    //修改
    public void update(AuthorApplication authorApplication) {
        aaRepository.save(authorApplication);
    }

    // 查询
    public List<AuthorApplication> findList() {
        return aaRepository.findAll();
    }

    public AuthorApplication findById(String id) {
        return aaRepository.findById(id).get();
    }


}
